﻿@using ZhifuWeb.Models
@model ZhifuWeb.Models.BookingViewModel
@{
    int sessionCount = 0;
    decimal sessionPrice = 0;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no;" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <title>网上订票|杭州野生动物世界手机官网</title>
    <script src="/Js/jquery-1.9.1.min.js"></script>
    <link href="/Style/layout.css" rel="stylesheet" />
</head>
<body>
    <section id="web_wrap">
        <!--//页面头部-->
        @Html.Raw(File.ReadAllText(Server.MapPath("/include/head02.htm")))
        <!--End页面头部-->

        <div class="second_nav">
            <div class="second_nav_btn">
                <a href="javascript:;" class="active">门票</a>
                <a href="@Url.Action("ChooseCard", "Booking")">年卡</a>
            </div>

            <a href="javascript:;" class="top_arrow"></a>
            <a href="javascript:;" class="bottom_arrow"></a>
        </div>

        <!--网上订票-->
        <div class="bookWrap">

            <form action="@Url.Action("ChooseTicket", "Booking")" method="POST">
                @foreach (var item in Model.Tickets)
                {
                    if (Session["Car"] != null)
                    {

                        var shopcar = Session["Car"] as ShopCarViewModel;
                        if (shopcar.TicketInfo != null)
                        {
                            var temp = shopcar.TicketInfo.SingleOrDefault(s => s.ClassId == item.ClassID);
                            if (temp != null)
                            {
                                sessionCount = temp.SumCount;
                                sessionPrice = temp.SumPrice;
                            }
                        }
                    }
                    var imgSrc = "";
                    switch (item.ClassName)
                    {
                        case "全价票":
                            imgSrc = "/book/images/fare/fare01.png";
                            break;
                        case "半价票":
                            imgSrc = "/book/images/fare/fare02.png";
                            break;
                        case "大学生门票":
                            imgSrc = "/book/images/fare/fare03.png";
                            break;
                        case "亲子套票":
                            imgSrc = "/book/images/fare/fare04.png";
                            break;
                        case "家庭套票":
                            imgSrc = "/book/images/fare/fare05.png";
                            break;
                    }
                    <li>
                        <h4>
                            <img src="@imgSrc" /><br />@item.ClassName
                        </h4>
                        <table>
                            <tr>
                                <th>原价<i>@Convert.ToDecimal(item.Price)</i></th>
                                <th>优惠价<em>@Convert.ToDecimal(item.DiscountPrice)</em></th>
                            </tr>

                            <tr>
                                <td>
                                    <div class="count_box">
                                        <a mark="@item.ClassID" href="javascript:;" class="minus_count jian" price="@Convert.ToDecimal(item.DiscountPrice)"></a>
                                        <input type="hidden" value="@sessionCount" name="@item.ClassID" />
                                        <em class="count" mark="@item.ClassID" price="@Convert.ToDecimal(item.DiscountPrice)">@sessionCount</em>
                                        <a mark="@item.ClassID" href="javascript:;" class="plus_count jia" price="@Convert.ToDecimal(item.DiscountPrice)"></a>
                                    </div>
                                </td>
                                <td>
                                    <div class="count_box2">
                                        共<span>￥</span><i mark="@item.ClassID">@sessionPrice</i>元
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </li>
                }
            </form>

            <div class="ticket_btn_box">
                <div class="ticket_btn_box_left">
                    <p>票数：<span class="piaoshu">0</span></p>
                    <p>合计：<i class="zhongjia">￥0</i></p>
                </div>
                <div class="ticket_btn_box_right">
                    <a href="javascript:;">下一步</a>
                </div>
            </div>
        </div>
        <!--网上订票End-->
        <!-- 协议弹窗 -->
        <div class="contract_pop">
            <div class="contract">
                <div class="contract_top">
                    电子购票协议
                </div>

                <div class="contract_middle">
                    <h3>套票说明：</h3>
                    <p>1） 亲子套票（一大一小）：包含一位成人和一位1.2m-1.5m之间的小孩。</p>
                    <p>2） 家庭套票（两大一小）：内容：包含两位成人和一位1.2m-1.5m之间的小孩。</p>

                    <h3>购票说明：</h3>
                    <p>1、如需当天游玩，预订时间截止至游玩当天早上8点。建议提前一天预订。预订成功后您将会收到预订成功的短信。 </p>
                    <p>2、景区实行二维码刷码入园或刷身份证入园。您只需拿您的手机或身份证，直接至检票口刷码入园。建议游客游玩时带上身份证。</p>
                    <p>3、在线订票只有在线支付可以享受优惠政策,只预订不支付者不享受任何折扣待遇。</p>
                    <p>4、如您和您的亲朋好友不能同时入园，建议按入园人数分批下单,方便您分批入园。</p>
                    <p>5、如需修改订单日期或者退款，请提前与网站客服人员联系；如出现未收到预订成功短信或二维码彩信.</p>
                </div>

                <div class="contract_bottom">
                    <a href="javascript:;">我不同意</a>
                    <a href="javascript:;">我同意</a>
                </div>
            </div>
            <div class="contract_bg"></div>
        </div>
        <!-- 协议弹窗 -->

        <section id="transverse"></section>
    </section>
</body>
</html>
@Html.Raw(File.ReadAllText(Server.MapPath("/include/Add.htm")))
<script src="/Js/jquery-1.9.1.min.js"></script>
<script src="/js/choose.js"></script>
<script>
    alert("如果你没有配置web.config的话,请先配置其中的appsetting,具体含义参看/lib/alipay/alipayconfig中的注释")
</script>